<template>
  <div>
    <div class="dashboard-container">
      <!-- <div class="dashboard-text">name: {{ name }}</div> -->

      <!-- <div class="top">LOGO</div> -->

      <div class="big-back-box">
        <el-container>
          <el-header style="margin-buttom: 30px"
            ><h2>法务服务平台</h2></el-header
          >
        </el-container>
        <!-- 走马灯 -->
        <el-carousel :interval="4000" type="card" height="200px">
          <el-carousel-item v-for="item in this.merryGoRound" :key="item">
            <!-- <h3 class="medium" >{{ item.imgSrc }}</h3> -->
            <img :src="item.imgSrc" alt="走马灯图片加载失败">
          </el-carousel-item>
        </el-carousel>

        <hr />
        <br />

        <!-- 优质服务 -->
        <div>
          <el-card class="box-card">
            <!-- 栏目名 -->
            <div slot="header" class="clearfix">
              <span>优质服务</span>
              <el-button style="float: right; padding: 3px 0" type="text">
                更多
              </el-button>
            </div>
            <!-- 内容小卡片 -->
            <el-row>
              <!-- 下面的:span="3"决定了每个具体服务小卡片的大小 -->
              <!-- span="3"刚好能排5个一行 -->
              <el-col
                :span="3"
                v-for="(o, index) in 5"
                :key="o"
                :offset="index > 0 ? 2.0 : 0"
              >
                <el-card :body-style="{ padding: '10px' }">
                  <img
                    src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                    class="image"
                  />
                  <div style="padding: 14px; text-align: center">
                    <span>法律咨询</span>
                    <div class="bottom clearfix">
                      <!-- <time class="time">{{ currentDate }}</time> -->
                      <el-button type="text" class="button">进入>></el-button>
                    </div>
                  </div>
                </el-card>
              </el-col>
            </el-row>
          </el-card>
        </div>

        <br /><br /><br />

        <!-- 成功案例 -->
        <div>
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>成功案例</span>
              <el-button style="float: right; padding: 3px 0" type="text">
                更多
              </el-button>
            </div>

            <!-- 内容 -->
            <!-- 2个单项选择器(可清空) -->
            <!-- <el-select v-model="value" clearable placeholder="请选择城市">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
            <el-select v-model="value" clearable placeholder="请选择服务类型" style="margin-left: 20px">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
            <el-button style="margin-left: 20px" type="primary">查询</el-button>
            <hr /> -->
            <!-- 成功案例列表 -->
            <div
              v-for="article in articleList"
              :key="article"
              class="text item"
            >
              {{ article.title }}
            </div>
            <!-- 分页按钮 -->
            <el-pagination background layout="prev, pager, next" :total="1000">
            </el-pagination>
          </el-card>
        </div>

        <br /><br /><br />

        <!-- 优质机构 -->
        <div>
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>优质机构</span>
              <el-button style="float: right; padding: 3px 0" type="text">
                更多
              </el-button>
            </div>

            <!-- 内容小卡片 -->
            <el-row>
              <!-- 下面的:span="3"决定了每个具体服务小卡片的大小 -->
              <!-- offset决定与上一个小卡片的间距，故与每行多少个小卡片也有关 -->
              <!-- span="3"刚好能排5个一行 -->
              <el-col
                :span="3"
                v-for="(o, index) in 6"
                :key="o"
                :offset="index > 0 ? 1 : 0"
              >
                <el-card :body-style="{ padding: '10px' }">
                  <img
                    src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                    class="image"
                  />
                  <div style="padding: 14px; text-align: center">
                    <span>律所</span>
                    <div class="bottom clearfix">
                      <!-- <time class="time">{{ currentDate }}</time> -->
                      <el-button type="text" class="button">进入>></el-button>
                    </div>
                  </div>
                </el-card>
              </el-col>

              <div style="height: 225px"></div>

              <el-col
                :span="3"
                v-for="(o, index) in 6"
                :key="o"
                :offset="index > 0 ? 1 : 0"
              >
                <el-card :body-style="{ padding: '10px' }">
                  <img
                    src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png"
                    class="image"
                  />
                  <div style="padding: 14px; text-align: center">
                    <span>律所</span>
                    <div class="bottom clearfix">
                      <!-- <time class="time">{{ currentDate }}</time> -->
                      <el-button type="text" class="button">进入>></el-button>
                    </div>
                  </div>
                </el-card>
              </el-col>
            </el-row>
          </el-card>
        </div>

        <br /><br /><br />

        <!-- 服务评价 -->
        <div>
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>服务评价</span>
              <el-button style="float: right; padding: 3px 0" type="text">
                更多
              </el-button>
            </div>
            <div v-for="o in 4" :key="o" class="text item">
              {{ "列表内容 " + o }}
            </div>
          </el-card>
        </div>

        <br /><br />
      </div>

      <!-- 页脚 -->
      <div class="footer">
        <div class="footer-back-box">
          <!-- 友情链接 -->
          <div class="footer-title">
            <h4>友情链接</h4>
          </div>
          <hr />
          <div>
            <el-row :gutter="20">
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站1</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站2</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站3</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站4</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站5</div>
              </el-col>
              <br /><br />
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站6</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站7</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站8</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站9</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">法律网站10</div>
              </el-col>
            </el-row>
          </div>
          <!-- 合作网站 -->
          <div class="footer-title">
            <h4>合作网站</h4>
          </div>
          <hr />
          <div>
            <el-row :gutter="20">
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站1</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站2</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站3</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站4</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站5</div>
              </el-col>
              <br /><br />
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站6</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站7</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站8</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站9</div>
              </el-col>
              <el-col :span="6" class="footer-link-card">
                <div class="grid-content bg-purple">合作网站10</div>
              </el-col>
            </el-row>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      size: "",
      articleList: [
        {
          id: 1,
          title: "成功案例1",
          context: "略",
          picture: "",
          state: "yes",
        },
        {
          id: 2,
          title: "成功案例2",
          context: "略",
          picture: "",
          state: "yes",
        },
        {
          id: 3,
          title: "成功案例3",
          context: "略",
          picture: "",
          state: "yes",
        },
        {
          id: 4,
          title: "成功案例4",
          context: "略",
          picture: "",
          state: "yes",
        },
      ],
      // 走马灯
      merryGoRound: [
        { 
          id: 1, 
          imgSrc: "./image/merryGoRound-1.jpg", 
        },
        { 
          id: 2, 
          imgSrc: "./image/merryGoRound-2.jpg", 
        },
        { 
          id: 3, 
          imgSrc: "./image/merryGoRound-3.jpg", 
        },
        { 
          id: 4, 
          imgSrc: "./image/merryGoRound-4.jpg", 
        },
        { 
          id: 5, 
          imgSrc: "./image/merryGoRound-5.jpg", 
        },
      ],
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>

<style lang="scss" scoped>
// 页头LOGO
.top {
  height: 50px;
  width: 1080px;
  margin-left: 45px;
  // background-color: lightgray;
  font-size: 30px;
  text-align: center;
  line-height: 50px;
}

// 大盒子
.big-back-box {
  width: 1080px;
  margin-left: 45px;
  // background-color: pink;
}

// 卡片风格走马灯
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

// 每一类服务的所属的那个背景卡片盒子（如：优质服务）
.text {
  font-size: 14px;
}
.item {
  margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}
.box-card {
  // width: 480px;
  margin-left: 15px;
  margin-right: 15px;
}

// 每一类服务下的小盒子（如：法律咨询）
.time {
  font-size: 13px;
  color: #999;
}
.bottom {
  margin-top: 13px;
  line-height: 12px;
}
.button {
  padding: 0;
  float: right;
}
.image {
  width: 100%;
  display: block;
}
.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}

// 原框架自带
.dashboard {
  &-container {
    margin-top: 30px;
    // margin-left: 30px;
    // margin-right: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}

// 页脚
.footer {
  height: 250px;
  background-color: rgb(245, 245, 245);
}
.footer-back-box {
  width: 1080px;
  margin-left: 45px;
}
.footer-title {
  height: 30px;
  line-height: 40px;
  padding-left: 10px;
}
.footer-link-card {
  width: 200px;
  // background-color: orange;
  margin-left: 10px;
}

// element-ui布局容器样式
.el-header,
.el-footer {
  // background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 10px;
}
.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}
.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}
body > .el-container {
  margin-bottom: 40px;
}
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}
.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
